Field Explorer
The Field Explorer has been enhanced. It now includes an Unbound Fields node.
Unbound Fields
The RDC now enables you to create report templates based on unbound field objects. Then, using minimal code, you can bind those field objects to a data source (or one of several data sources) at runtime. The Report Engine uses the data type and the Name property of the unbound field object to match it with a data field in the recordset.
This functionality makes it easy to build reporting into n-tier applications where you have on-demand recordsets and non-continuous data connections. It also makes it easy to build a single report that can work with a variety of recordsets, making development and maintenance more efficient.
Unbound fields allow for great flexibility, since you can easily change the data source for an unbound field at runtime.
- In the Visual Basic RDC design time environment, you can easily add unbound fields to your report by dragging and dropping any of the unbound field types from the Designer's treeview onto the report.
- In the Report Designer Component runtime, you can add an unbound field object to a section using the new function AddUnboundFieldObject under the Section class.
- To bind the unbound field to a database field at runtime, you can use the new method SetUnboundFieldSource.
- Alternatively, you may use automatic unbound field binding, based on either the field name or the field name and value type of the field in the data source. To do so, you would use the new method AutoSetUnboundFieldSource, and specify one of the constants crBMTName or crBMTNameAndValue for CRBindingMatchType.